#pragma once

#include "IGameState.h"
#include "SGD Wrappers/SGD_Math.h"

class CSGD_Direct3D;
class CSGD_DirectInput;
class CSGD_TextureManager;
class CSGD_XAudio2;
class CSGD_MessageSystem;
class CEntityManager;
class CTileSystem;
class CParticleSystem;
class CEntity;
class CBaseLight;
class IMessage;

class CGamePlayState : public IGameState
{
private:
	tVector2D tCameraPos;
	bool bPaused;
	int nPauseCursor;

	CSGD_Direct3D* pD3D;
	CSGD_DirectInput* pDI;
	CSGD_TextureManager* pTM;
	CSGD_XAudio2* pXA;
	CSGD_MessageSystem* pMS;
	CEntityManager* pEM;
	CTileSystem* pTS;
	CParticleSystem* pPS;

	CGamePlayState(void);
	virtual ~CGamePlayState(void);
	CGamePlayState(const CGamePlayState&);
	CGamePlayState& operator= (const CGamePlayState&);

public:
	static CGamePlayState* GetInstance();
	
	virtual void Enter() override;
	virtual void Exit() override;
	virtual void Input() override;
	virtual void Update(float fElapsedTime) override;
	virtual void Render() override;

	static void MessageProc(IMessage* pMessage);

	CEntity* CreateItem(int nItemType);
	CEntity* CreateEnemy(int nEntityType);
	CEntity* CreateProjectile(CEntity* pOwner);
	CBaseLight* CreateLight(CEntity* pOwner);
	CBaseLight* CreateLight(int nLightType, tVector2D tPosition, float fOrientation);
};